const path = require('path')
const webpack = require('webpack')

module.exports = {
    entry: {
        delSmallVideo:path.resolve(__dirname, './src/delSmallVideo.ts'),
        huluwa:path.resolve(__dirname, './src/huluwa.ts'),
    },
    target: 'node',
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: '[name].js'
    },
    plugins: [
        new webpack.DefinePlugin({
            'process.env.FLUENTFFMPEG_COV': false
        })
    ],
    resolve: {
        // Add '.ts' and '.tsx' as resolvable extensions.
        extensions: ['.ts', '.tsx', '.js']
    },

    module: {
        rules: [
            // All files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'.
            { test: /\.tsx?$/, loader: 'ts-loader' }
        ]
    },
}
